<?php

  $host = 'localhost';
  $username = 'root';
  $password = '';
  $db_name = 'nb158g';

  #db connection
  mysql_connect($host, $username, $password) or exit(mysql_error());

  # db selection
  mysql_select_db($db_name)or exit(mysql_error());


  ////////////// DB FUNCTIONS /////////////
  /* used to return status as string
   *
   * @param $status INT
   * @return Status in STRING as active/inactive
   * */
  function getStatus($status=0){

    return ($status==0) ? 'In Active' : 'Active';
  }
